<?php /* Smarty version Smarty-3.1.13, created on 2013-09-07 15:40:22
         compiled from ".\templates\summaryDataAj.tpl" */ ?>
<?php /*%%SmartyHeaderCode:31015522abfcb37fee8-05947007%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '54a36cdf5b7928232dcd620361213ad5b8c0ba5f' => 
    array (
      0 => '.\\templates\\summaryDataAj.tpl',
      1 => 1378548621,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '31015522abfcb37fee8-05947007',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_522abfcb51f005_54873056',
  'variables' => 
  array (
    'reminders' => 0,
    'partyArray' => 0,
    'totaljamaRupiya' => 0,
    'totaludhaarRupiya' => 0,
    'totalRupiya' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_522abfcb51f005_54873056')) {function content_522abfcb51f005_54873056($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_select_date')) include 'D:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\haremor\\include\\smarty\\libs\\plugins\\function.html_select_date.php';
if (!is_callable('smarty_modifier_date_format')) include 'D:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\htdocs\\haremor\\include\\smarty\\libs\\plugins\\modifier.date_format.php';
?><script type="text/javascript">
$(document).ready(function()
{
  $('.checkAll').click(function () {
    if($(this).is(':checked'))
    {
      $('.checkboxAll').attr('checked','checked');
    }
    else
    {
    	$('.checkboxAll').removeAttr('checked');
    }
  });
});
function myFunction()
{
	if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
<?php if ($_smarty_tpl->tpl_vars['reminders']->value==1){?>
  <form name="contentForm" id="contentForm" action="summaryChangeDate.php" method="POST">
<?php }else{ ?>
  <form name="contentForm" id="contentForm" action="summaryPrintPdf.php" method="POST">
<?php }?>
<table border='0' align="center">
<tr>
	<th class="table1">
		<?php if ($_smarty_tpl->tpl_vars['reminders']->value==1){?>
		  &nbsp;
		<?php }else{ ?>
      <input type="checkbox" name="checkAll" id="checkAll" class="checkAll">
	    <input type="submit" name="submitDateBtn" value="GO..." class="button" />
	  <?php }?>
	</th>
	<td align="center" class="table1">&nbsp;</td>
	<td align="center" class="table1">Party Name</td>
	<td align="center" class="table1">Phone No </td>
	<td align="center" class="table1">City</td>
	<td align="center" class="table1" align="right">JAMA Rupiya</td>
	<td align="center" class="table1" align="right">UDHAR Rupiya</td>
	<?php if ($_smarty_tpl->tpl_vars['reminders']->value==1){?>
	  <td align="center" class="table1" align="right">Out Of Date
	    <input type="submit" value="Change" name="submit" onClick="changeDate();">
	    <?php echo smarty_function_html_select_date(array('prefix'=>"newRemindDate",'start_year'=>"-8",'end_year'=>"+4",'field_order'=>"DMY",'month_format'=>"%m",'day_value_format'=>"%02d"),$_smarty_tpl);?>

	  </td>
	<?php }?>
	
</tr>

<?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec'])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['name'] = 'sec';
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['partyArray']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['sec']['total']);
?>
<?php if ($_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['total']!=0){?>
<tr>
	<td class="table2" align="center">
		<?php if ($_smarty_tpl->tpl_vars['reminders']->value==1){?>
		  &nbsp;
		<?php }else{ ?>
	    <input type="checkbox" class="checkboxAll" name="checkedParty[]" value="<?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
">
	  <?php }?>
	</td>
	<td class="table2" align="center">
	  <a href="summaryDelete.php?partyId=<?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
" onclick="return myFunction();" class="link"><img src="./images/deleteIcon.png" height="20px" width="20px"></a>
	</td>
	<td><?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyName'];?>
</td>
	<td><?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['mobile1'];?>
</td>
	<td><?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['city'];?>
</td>
	<td align="right">
		<?php if ($_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['total']>0){?>
		  <?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['total'];?>

		<?php }else{ ?>
		  0
		<?php }?>
	</td>
	<td align="right">
		<?php if ($_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['total']<0){?>
		  <?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['total'];?>

		<?php }else{ ?>
		  0
		<?php }?>		
	</td>
	<?php if ($_smarty_tpl->tpl_vars['reminders']->value==1){?>
	  <td align="center">
      <input type="checkbox" value="1" name="partyIdForDate['<?php echo $_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['partyId'];?>
']"> <?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['partyArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['remindDate'],"%d-%m-%Y");?>

	  </td>
	<?php }?>
</tr>
<?php }?>
<?php endfor; else: ?>
<tr>
	<td>
    <b>Record not found </b>
  </td>
</tr>
<?php endif; ?>
<tr>
<td colspan="6" align="right"><?php echo $_smarty_tpl->tpl_vars['totaljamaRupiya']->value;?>
</td>
<td colspan="1" align="right"><?php echo $_smarty_tpl->tpl_vars['totaludhaarRupiya']->value;?>
</td>
</tr>
<tr>
	<td colspan="7" align="center"><b>Total :<?php echo $_smarty_tpl->tpl_vars['totalRupiya']->value;?>
</b></td>
</tr>

</table>
</form><?php }} ?>